package com.wwj.tem.exception;

import com.wwj.tem.common.Result;
import lombok.Getter;

/**
 * @author: wwj
 * @create: 2024/7/24 - 21:56
 * Description: 自定义异常类
 */
@Getter
public class BusinessException extends RuntimeException {
	
	/**
	 * 错误码
	 */
	private final int code;
	
	public BusinessException(int code, String message) {
		super(message);
		this.code = code;
	}
	
	public BusinessException(String message){
		super(message);
		this.code = Result.CODE_ERROR;
	}
}
